﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Die : MonoBehaviour {

    public int hp = 100;
    // Use this for initialization
    void OnTriggerEnter2D(Collider2D collider)
    {
        if (collider.tag == "Attacker")
        {
            hp = hp - 10;
            if (hp == 0)
            {
                Destroy(gameObject);
            }
        }
    }

}
